<div class="bg-light lter b-b wrapper-md ng-scope">
    <h4 class="m-n font-thin">模块广告管理</h4>
    <!--<button ui-sref="app.modules" class="btn-back btn btn-dark btn-sm btn-rounded">-->
        <!--返回-->
    <!--</button>-->
</div>
<div class="wrapper-md ng-scope" ng-controller="modulesAdvertisementCtrl">
    <div class="panel panel-default">
        <div class="row wrapper">
            <div class="pull-right col-sm-3">
                <div class=" pull-right">
                    <a class="btn btn-sm btn-info" ui-sref="app.modulesAdvertisementAdd({modulesId:modulesId})" target="_blank">添加广告</a>
                </div>
            </div>
            <div class="clearfix"></div>
        </div>
        <div class="table-responsive">
            <table class="table table-striped b-t b-light">
                <thead>
                    <tr>
                        <th width="500">广告图片</th>
                        <th width="500">连接</th>
                        <th width="130" class="pull-left">类型</th>
                        <th>排序</th>
                        <th>状态</th>
                        <th width="200" class="text-center">操作</th>
                    </tr>
                </thead>
                <tbody>
                    <tr ng-repeat="item in list">
                        <td width="500">
                            <img src="{{app.image.advertise}}{{item.imgUrl}}">
                        </td>
                        <td width="500" style="word-break:break-all" >{{item.advertiseUrl}}</td>
                        <td width="130">{{item.advertiseTypeName}}</td>
                        <td>{{item.sort}}</td>
                        <td>
                            <span ng-bind="{0:'上架',1:'下架'}[item.status]" class="label" ng-class="{0:'label-success',1:'label-default'}[item.status]"></span>
                        </td>
                        <td class="t-btns" width="200">
                            <button class="btn btn-sm btn-info" ui-sref="app.modulesAdvertisementEdit({id:item.id,modulesId:modulesId})">修改</button>
                            <button class="btn btn-sm btn-danger" ng-click="delModulesAdvertise(item.modulesAdvertiseId,item.status)">删除</button>
                            <div class="btn-group dropdown" dropdown="">
                                <button class="btn btn-sm btn-default" dropdown-toggle="" aria-haspopup="true" aria-expanded="false">更多<span class="caret"></span>
                                </button>
                                <ul class="dropdown-menu">
                                    <li ng-click="changeStatus(item.id)" ng-if="item.status==0 || item.status==1"><a href="" ng-bind="{1:'上架',0:'下架'}[item.status]">下架</a></li>
                                    <li class="divider"></li>
                                    <li><a ng-click="toTop(item.id)">置顶</a></li>
                                </ul>
                            </div>
                        </td>
                    </tr>
                </tbody>

            </table>
        </div>
        <footer class="panel-footer">
            <div class="row">
                <div class="col-sm-offset-4 col-sm-4 text-center">
                    <small class="text-muted inline m-t-sm m-b-sm">显示第 {{startRow}} 至 {{endRow}} 项结果，共 {{totalItems}} 项</small>
                </div>
                <div class="col-sm-4 text-right">
                    <pagination boundary-links="true" total-items="totalItems" ng-model="currentPage"
                                ng-change="pageChanged()" max-size="{{maxPageRow}}" class="pagination-sm m-t-none m-b"
                                previous-text="上一页" next-text="下一页"
                                first-text="首页" last-text="尾页"></pagination>
                </div>
            </div>
        </footer>
    </div>
</div>





